/**
 * Copyright (c) 2018-2025, NXOS Development Team
 * SPDX-License-Identifier: Apache-2.0
 * 
 * Contains: syscall trace event
 * 
 * Change Logs:
 * Date           Author            Notes
 * 2025-06-24     JasonHu           Init
 */

#ifndef __NXOS_TRACE_SYSCALL_H__
#define __NXOS_TRACE_SYSCALL_H__

#include <nxos_mini.h>

#ifdef __cplusplus
extern "C" {
#endif

#ifdef CONFIG_TRACE_EVENT_SYSCALL

NX_Error NX_TraceSyscallEnter(NX_UArch syscallNr, NX_UArch arg0, NX_UArch arg1, NX_UArch arg2,
    NX_UArch arg3, NX_UArch arg4, NX_UArch arg5, NX_UArch arg6);
NX_Error NX_TraceSyscallExit(NX_UArch syscallNr, NX_UArch value);

#else

NX_INLINE NX_Error NX_TraceSyscallEnter(NX_UArch syscallNr, NX_UArch arg0, NX_UArch arg1, NX_UArch arg2,
    NX_UArch arg3, NX_UArch arg4, NX_UArch arg5, NX_UArch arg6)
{
    return NX_EOK;
}

NX_INLINE NX_Error NX_TraceSyscallExit(NX_UArch syscallNr, NX_UArch value)
{
    return NX_EOK;
}

#endif

#ifdef __cplusplus
}
#endif

#endif  /* __NXOS_TRACE_SYSCALL_H__ */
